Skip to main content

HtmlHelper<TModel>

Assembly: ServiceStack.Razor.dll
View Source
Declaration
public class HtmlHelper<TModel> : HtmlHelper, IHtmlContext

Properties

ViewData

View Source
Declaration
public ViewDataDictionary<TModel> ViewData { get; }

Inherited Properties

ClientValidationEnabled

View Source
Declaration
public static bool ClientValidationEnabled { get; set; }

HttpRequest

View Source
Declaration
public IHttpRequest HttpRequest { get; set; }

HttpResponse

View Source
Declaration
public IHttpResponse HttpResponse { get; set; }

MarkdownPage

View Source
Declaration
public MarkdownPage MarkdownPage { get; protected set; }

RazorPage

View Source
Declaration
public IRazorView RazorPage { get; protected set; }

ScopeArgs

View Source
Declaration
public Dictionary<string, object> ScopeArgs { get; protected set; }

UnobtrusiveJavaScriptEnabled

View Source
Declaration
public static bool UnobtrusiveJavaScriptEnabled { get; set; }

ViewBag

View Source
Declaration
public dynamic ViewBag { get; }

ViewContext

View Source
Declaration
public ViewContext ViewContext { get; }

ViewData

View Source
Declaration
public ViewDataDictionary ViewData { get; protected set; }

ViewDataContainer

View Source
Declaration
public IViewDataContainer ViewDataContainer { get; }

ViewEngine

View Source
Declaration
public IViewEngine ViewEngine { get; set; }

Writer

View Source
Declaration
public StreamWriter Writer { get; set; }

Inherited Methods

AnonymousObjectToHtmlAttributes(Object)

View Source
Declaration
public static RouteValueDictionary AnonymousObjectToHtmlAttributes(object htmlAttributes)
Returns

ServiceStack.Html.RouteValueDictionary

Parameters
TypeName
System.ObjecthtmlAttributes

AntiForgeryToken()

View Source
Declaration
public MvcHtmlString AntiForgeryToken()
Returns

ServiceStack.Html.MvcHtmlString

AntiForgeryToken(String)

View Source
Declaration
public MvcHtmlString AntiForgeryToken(string salt)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
System.Stringsalt

AntiForgeryToken(String, String, String)

View Source
Declaration
public MvcHtmlString AntiForgeryToken(string salt, string domain, string path)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
System.Stringsalt
System.Stringdomain
System.Stringpath

AttributeEncode(Object)

View Source
Declaration
public string AttributeEncode(object value)
Returns

System.String

Parameters
TypeName
System.Objectvalue

AttributeEncode(String)

View Source
Declaration
public string AttributeEncode(string value)
Returns

System.String

Parameters
TypeName
System.Stringvalue

Debug(Object)

View Source
Declaration
public string Debug(object model)
Returns

System.String

Parameters
TypeName
System.Objectmodel

EnableClientValidation()

View Source
Declaration
public void EnableClientValidation()

EnableClientValidation(Boolean)

View Source
Declaration
public void EnableClientValidation(bool enabled)
Parameters
TypeName
System.Booleanenabled

EnableUnobtrusiveJavaScript()

View Source
Declaration
public void EnableUnobtrusiveJavaScript()

EnableUnobtrusiveJavaScript(Boolean)

View Source
Declaration
public void EnableUnobtrusiveJavaScript(bool enabled)
Parameters
TypeName
System.Booleanenabled

Encode(Object)

View Source
Declaration
public string Encode(object value)
Returns

System.String

Parameters
TypeName
System.Objectvalue

Encode(String)

View Source
Declaration
public string Encode(string value)
Returns

System.String

Parameters
TypeName
System.Stringvalue

FormatValue(Object, String)

View Source
Declaration
public string FormatValue(object value, string format)
Returns

System.String

Parameters
TypeName
System.Objectvalue
System.Stringformat

GenerateIdFromName(String)

View Source
Declaration
public static string GenerateIdFromName(string name)
Returns

System.String

Parameters
TypeName
System.Stringname

GenerateIdFromName(String, String)

View Source
Declaration
public static string GenerateIdFromName(string name, string idAttributeDotReplacement)
Returns

System.String

Parameters
TypeName
System.Stringname
System.StringidAttributeDotReplacement

GetErrorMessage()

View Source
Declaration
public MvcHtmlString GetErrorMessage()
Returns

ServiceStack.Html.MvcHtmlString

GetErrorStatus()

View Source
Declaration
public ResponseStatus GetErrorStatus()
Returns

ResponseStatus

GetFieldError(String)

View Source
Declaration
public ResponseError GetFieldError(string errorName)
Returns

ResponseError

Parameters
TypeName
System.StringerrorName

GetFormMethodString(FormMethod)

View Source
Declaration
public static string GetFormMethodString(FormMethod method)
Returns

System.String

Parameters
TypeName
ServiceStack.Html.FormMethodmethod

GetInputTypeString(InputType)

View Source
Declaration
public static string GetInputTypeString(InputType inputType)
Returns

System.String

Parameters
TypeName
ServiceStack.Html.InputTypeinputType

GetMethod(String)

View Source
Declaration
public static MethodInfo GetMethod(string methodName)
Returns

System.Reflection.MethodInfo

Parameters
TypeName
System.StringmethodName

GetUnobtrusiveValidationAttributes(String)

View Source
Declaration
public IDictionary<string, object> GetUnobtrusiveValidationAttributes(string name)
Returns

System.Collections.Generic.IDictionary<System.String,System.Object>

Parameters
TypeName
System.Stringname

GetUnobtrusiveValidationAttributes(String, ModelMetadata)

View Source
Declaration
public IDictionary<string, object> GetUnobtrusiveValidationAttributes(string name, ModelMetadata metadata)
Returns

System.Collections.Generic.IDictionary<System.String,System.Object>

Parameters
TypeName
System.Stringname
ServiceStack.Html.ModelMetadatametadata

HasFieldError(String)

View Source
Declaration
public bool HasFieldError(string errorName)
Returns

System.Boolean

Parameters
TypeName
System.StringerrorName

HttpMethodOverride(HttpVerbs)

View Source
Declaration
public MvcHtmlString HttpMethodOverride(HttpVerbs httpVerb)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HttpVerbshttpVerb

HttpMethodOverride(String)

View Source
Declaration
public MvcHtmlString HttpMethodOverride(string httpMethod)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
System.StringhttpMethod

IncludeFile(String)

View Source
Declaration
public MvcHtmlString IncludeFile(string virtualPath)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
System.StringvirtualPath

Init(IHttpRequest, IHttpResponse, IViewEngine, ViewDataDictionary, HtmlHelper)

View Source
Declaration
public void Init(IHttpRequest httpReq, IHttpResponse httpRes, IViewEngine viewEngine, ViewDataDictionary viewData, HtmlHelper htmlHelper)
Parameters
TypeName
IHttpRequesthttpReq
IHttpResponsehttpRes
ServiceStack.Html.IViewEngineviewEngine
ServiceStack.Html.ViewDataDictionaryviewData
ServiceStack.Html.HtmlHelperhtmlHelper

Init(IViewEngine, IRequest, IResponse, IRazorView, Dictionary<String, Object>, ViewDataDictionary)

View Source
Declaration
public void Init(IViewEngine viewEngine, IRequest httpReq, IResponse httpRes, IRazorView razorPage, Dictionary<string, object> scopeArgs = null, ViewDataDictionary viewData = null)
Parameters
TypeName
ServiceStack.Html.IViewEngineviewEngine
IRequesthttpReq
IResponsehttpRes
ServiceStack.Html.IRazorViewrazorPage
System.Collections.Generic.Dictionary<System.String,System.Object>scopeArgs
ServiceStack.Html.ViewDataDictionaryviewData

Init(MarkdownPage, Dictionary<String, Object>, Boolean, ViewDataDictionary, HtmlHelper)

View Source
Declaration
public void Init(MarkdownPage markdownPage, Dictionary<string, object> scopeArgs, bool renderHtml, ViewDataDictionary viewData, HtmlHelper htmlHelper)
Parameters
TypeName
ServiceStack.Support.Markdown.MarkdownPagemarkdownPage
System.Collections.Generic.Dictionary<System.String,System.Object>scopeArgs
System.BooleanrenderHtml
ServiceStack.Html.ViewDataDictionaryviewData
ServiceStack.Html.HtmlHelperhtmlHelper

Partial(String)

View Source
Declaration
public MvcHtmlString Partial(string viewName)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
System.StringviewName

Partial(String, Object)

View Source
Declaration
public MvcHtmlString Partial(string viewName, object model)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
System.StringviewName
System.Objectmodel

Raw(Object)

View Source
Declaration
public MvcHtmlString Raw(object content)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
System.Objectcontent

RenderAction(String, String)

View Source
Declaration
public MvcHtmlString RenderAction(string route, string viewName = null)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
System.Stringroute
System.StringviewName

RenderMarkdownToHtml(String)

View Source
Declaration
public MvcHtmlString RenderMarkdownToHtml(string markdown)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
System.Stringmarkdown

SetModel(Object)

View Source
Declaration
public void SetModel(object model)
Parameters
TypeName
System.Objectmodel

Implements